import Axios from "axios";
import {server} from "../util/"
export default {
    
    isHavetoken: async () => {
        let res = await Axios({
            method:"GET",
            url:"/pxy/users/validate"
        })
        return res.data
    },
     GetMovies: async ({curPage,eachPage,status}) => {
        
        let res = await Axios({
            method:"GET",
            url:server+"/movies",
            params:{
                curPage,
                eachPage,
                status
            }
        })
        return res.data
    },
     GetMovieById: async (_id) => {
        
        let res = await Axios({
            method:"GET",
            url:server+"/movies/"+_id,
        })
        return res.data
    }
}